package com.itheima.system;


import java.util.Arrays;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        int[] arr1 = {1,2,3,4,5};
        int[] arr2 = new int[8];
        System.arraycopy(arr1,0,arr2,0,5);
        System.out.println(arr2);
        System.out.println(Arrays.toString(arr2)); //使用输出的是地址值需要用toString进行转换

        System.arraycopy(arr1,1,arr2,3,3);
        System.out.println(arr2);
        Scanner b = new Scanner(System.in);
        getNum(b.nextInt());
    }

    public static void getNum(double b){
        double a = Math.round(b);
        System.out.println(a);
    }
}
